//
//  QHttpManager.h
//  QoilPublic
//
//  Created by 杨凯 on 16/7/1.
//  Copyright © 2016年 杨凯. All rights reserved.
//

#import "AFNetworking.h"

@interface QHttpManager : AFHTTPSessionManager

//http请求单例
+ (QHttpManager*)sharedManager;

//普通请求
- (void)POST:(NSString *)urlPath
  parameters:(id)params
  completion:(void(^)(NSData *data, NSDictionary *dict, NSError *error))completion;


//2.0加密请求
- (void)POST:(NSString *)urlPath
  parameterMD5:(id)params
  completion:(void(^)(NSData *data, NSDictionary *dict, NSError *error))completion;

//2.0加密请求 加满
- (void)POST:(NSString *)urlPath
  parameterMD5jm:(id)params
  completion:(void(^)(NSData *data, NSDictionary *dict, NSError *error))completion;



//上传头像
- (void)uploadFile:(NSString*)urlTokenPath
            params:(id)params
             image:(UIImage*)img
        completion:(void(^)(NSData *data, NSDictionary *dict, NSError *error))completion;


//上传文件
- (void)upLoadData:(NSString *)urlPath
            params:(id)params
              data:(NSData *)data
          fileName:(NSString *)fileName
        completion:(void(^)(NSData *data, NSDictionary *dict, NSError *error))completion;


//下载文件
#pragma mark -- 请求记账本
- (void)update:(NSString *)urlPath completion:(void(^)(NSData *data, NSArray *arr, NSError *error))completion;

- (void)updateData:(NSString *)urlPath completion:(void(^)(NSData *data, NSDictionary *dic, NSError *error))completion;

//上传多张照片免费办证
- (void)uploadMorePhone:(NSString*)urlTokenPath
                 params:(id)params
                  array:(NSArray *)array
             completion:(void(^)(NSData *data, NSDictionary *dict, NSError *error))completion;

@end
